Boreholes are drilled into the earth for various reasons such as exploration and production for hydrocarbons and geothermal energy in addition to sequestration of carbon dioxide. A borehole is typically drilled using a drill bit disposed at the distal end of a series of connected drill pipes referred to as a drill string. A drill rig rotates the drill string, which rotates the drill bit, to cut into the earth to create the borehole. As the borehole is drilled deep into the earth, the drill string may bend and vibrate due to force imbalances on the drill string. Excessive vibrations can delay drilling and possibly cause damage, both of which may significantly affect the cost of drilling. Hence, it would be appreciated in the drilling industry if a method could be developed to mathematically model a drill string with high physical accuracy and in real time in order to improve drilling efficiency.